const Controller = require("egg").Controller;

class HomeController extends Controller {
  async index() {
    const { ctx } = this;
    // ctx.body = "Hello Egg";
    console.log(this.app.foo);
    console.log(ctx.app.foo);
    console.log(this.config.keys);
    const users = this.service.user.getUserList();
    console.log("🚀 ~ HomeController ~ index ~ users:", users);
    console.log(this.ctx.helper.hello());
    await ctx.render("index.tpl", {
      foo: users,
    });
  }

  foo() {
    this.ctx.body = "foo";
  }
}

module.exports = HomeController;
